const TokenKey = 'heima-toutiao-token'
const saveToken = token => {
  localStorage.setItem(TokenKey, JSON.stringify(token))
}
const removeToken = () => {
  localStorage.removeItem(TokenKey)
}
const getToken = () => {
  return JSON.parse(localStorage.getItem(TokenKey))
}

export { saveToken, removeToken, getToken }
